1. Field
The following description relates to a method and apparatus for selecting a preemption technique.
2. Description of Related Art
Computer systems of today such as, for example, desktops, servers, cellular phones, and tablet PCs adopt Graphics Processing Units (GPUs) to support traditional Central Processing Units (CPUs). In such heterogeneous systems, tasks may be transmitted from a CPU to a GPU in the form of kernels. The GPU may effectively speed up data-parallel kernels with the help of new programming models such as OpenCL.
Meanwhile, heterogeneous systems may include a plurality of CPUs sharing one GPU. When the plurality of CPUs simultaneously transmit data-parallel kernels to the GPU, multi-tasking needs to be supported. In general, multi-tasking on a CPU is performed through context switching. However, a task executed on the GPU has a huge size of a context, such that various problems may occur if preemptive multi-tasking is performed through context switching on the GPU.